package com.turbo.boot.crawler.dao.dal;

import com.turbo.boot.crawler.dao.entity.CrawlerConfigEntity;
import com.turbo.boot.crawler.dao.mapper.CrawlerConfigMapper;
import com.turbo.framework.dal.TurboBaseDal;
import com.turbo.starter.mybatis.TurboDalImpl;
import org.springframework.stereotype.Repository;

/**
 * 描述
 *
 * @author wuyn
 * @since 2020/4/11
 */
@Repository
public class CrawlerConfigDal extends TurboDalImpl<CrawlerConfigMapper, CrawlerConfigEntity> implements TurboBaseDal<CrawlerConfigEntity> {

    public CrawlerConfigEntity selectByCrawlerRef(String ref) {
        CrawlerConfigEntity example = new CrawlerConfigEntity();
        example.setCrawlerRef(ref);
        example.setStatus(1);
        return selectOne(example);
    }

    public CrawlerConfigEntity selectByCrawlerParserRef(String ref) {
        CrawlerConfigEntity example = new CrawlerConfigEntity();
        example.setCrawlerPageParserRef(ref);
        example.setStatus(1);
        return selectOne(example);
    }

}
